package org.lex.ftp.ui.speed;

import java.awt.BorderLayout;
import java.awt.Window;

import javax.swing.JPanel;

import org.lex.swing.widgets.EnhancedDialog;


public class SpeedDialog extends EnhancedDialog {
	private JPanel pane = null;
	private SpeedPane speedPane = null;

	public SpeedDialog(Window root) {
		super(root);
		this.initialize();
	}

	@Override
	public void cancel() {
		this.dispose();
	}

	private void initialize() {
		this.setSize(600, 500);
		this.setTitle("Speed");
		this.setContentPane(this.getPane());
	}

	private JPanel getPane() {
		if (null == pane) {
			pane = new JPanel(new BorderLayout());
			pane.add(this.getSpeedPane(), BorderLayout.CENTER);
		}
		return pane;
	}

	private SpeedPane getSpeedPane() {
		if (null == speedPane)
			speedPane = new SpeedPane();
		return speedPane;
	}
}
